<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>初心-添加闲置物品</title>
		<meta name="description" content="" />
		<meta name="author" content="胡毅鹏" />
		<!--[if lt IE 9]>
			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
		<link rel="shortcut icon" href="favicon.ico" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/reset.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/grid.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/master.css" type="text/css" media="screen" />
	</head>
	<body>
		<div>
			<header>
				<div class="container_12">
					<h1><a href="chuxin.html">初  心</a></h1>
					<nav id="mainNav" >
						<a href="chuxin.html">首页</a>
						<a href="#" class="selected">交易墙</a>
						<a href="#">图书库</a>
						<a href="#">讨论区</a>
					</nav>
					<form action="/search" method="">
						<input type="text" class="search-query" placeholder="搜索" />
					</form>
					<nav id="sideNav" class="gird_3" >
						<a href="#">胡太狼</a>
						<a href="#" >设置</a>
						<a href="#" >退出</a>
					</nav>
	
				</div>
			</header>
			<div class="container_12">
				<div class="grid_8 mainside">
					<div class="wallpanel">
			    		<div class="newhead">
			    			<h3>交易墙·添加闲置物品
			    				<a href="#" class="more">‹‹&nbsp;返回交易墙</a>
			    			</h3>
			    		</div>
			    		<form id="newdetail" class="detailcontent" method="post" enctype="multipart/form-data" action="">
			    			<div class="row">
                                {{ form.detailtype.label }}
                                {{ form.detailtype }}
			    			</div>

			    			<div id="rowtwo" style="display: none;" >
			    				<div class="row">
			    					<label for="detailisbn">输入你想添加的图书ISBN号（耐心哦）：</label>
			    				</div>
			    				<div class="row">
			    					<input type="text" id="detailisbn" name="detailisbn" class="text"  placeholder="ISBN"  />
			    				    <span class="btn-post">
			    				        <input type="submit" value="下一步" class="btn-submit" />
			    			        </span>
			    				</div>
			    				<div class="row">
                                    <img src="{{ STATIC_URL }}img/isbn_tips.png">
			    				</div>
			    			</div>
			    				
			    			<div id="rowone">
			    				<div class="row" >
                                    {{ form.detailname.label}}
			    				    <p>
                                    {{ form.detailname }}
			    			        </p> 
			    			    </div>
			    			    <div class="row" >
                                    {{ form.detailnote.label }}
                                    {{ form.detailnote }}
			    			    </div>
			    			    <div class="row" >
                                    <span style="">{{ form.detailpic.label }}:</span>
                                    {{ form.detailpic }}
			    			    </div>
			    			    <div class="row" >
			    				    <span class="btn-post">
			    				        <input type="submit" value="发表" class="btn-submit" />
			    			        </span>
			    			        <span style="float: right;">
			    				        <input type="submit" value="取消，好可惜啊" class="btn-cancel" />
			    			        </span>
			    			    </div>
			    			</div>	    			
			    		</form>
			    	</div>
					
			    </div>
			    <div class="grid_4 sidebar">
			     	<div class="communityinfo">
			    		<p>你的某些物品是否还在某个角落睡觉呢？</p><br />
			    		<p>让它来初心吧，或许某个人正在寻找它...</p><br />
			    		<p>编辑信息时，不妨说明一下所在位置和心理价格。</p>
			    	</div>
			    </div>
			    <div class="clearfix" />
			</div>
			
			<footer class="container_12">
				<nav class="footinfo">
					<a href="#">关于</a>
					<span>·</span>
					<a href="#">联系</a>
					<span>·</span>
					<a href="#">反馈</a>
					<span>&copy;2012 chuxin.me</span>
				</nav>
			</footer>
		</div>
		
		<script src="http://lib.sinaapp.com/js/jquery/1.7/jquery.js" type="text/javascript"></script>
		<script src="js/jquery.validate.js" type="text/javascript"></script>
	    <script type="text/javascript">
	    $("#detailtype").change(function() {
				var checkValue = $("#detailtype").val();
	        if (checkValue == 1 ) { $("#rowone").hide(); $("#rowtwo").show(); }
	        else {$("#rowone").show(); $("#rowtwo").hide(); }
			}); 	

        
        function imgFilter(obj){
                if(/.*\.jpg$/.test($(obj).val()) || /.*\.png$/.test($(obj).val()) || /.*\.gif$/.test($(obj).val()) || /.*\.JPG$/.test($(obj).val()) || /.*\.PNG$/.test($(obj).val()) || /.*\.GIF$/.test($(obj).val()) || /.*\.jpeg$/.test($(obj).val()) || /.*\.JPEG$/.test($(obj).val()) || /.*\.bmp$/.test($(obj).val()) || /.*\.BMP$/.test($(obj).val())){
                }else{
                        alert("你只可以上传JPG、JPEG、GIF、PNG或BMP文件~");
                        $(obj).val("");
                        var _parent = $(obj).parent();
                        var _obj = $(obj).clone();
                        $(obj).remove();
                        _parent.append(_obj);
                        return false;
                }
        }
        	        
	    </script>
	</body>
</html>
